<?php

namespace app\admin\controller\shopro\relation;

use think\Db;
use app\admin\controller\shopro\Common;
use addons\shopro\service\Wallet as WalletService;
use app\admin\model\shopro\user\User as UserModel;
use app\admin\model\shopro\user\Coupon as UserCouponModel;

class Relation extends Common
{

    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = new UserModel;
    }
    public function index()
    {

        if ($this->request->isAjax()) {


        }
        $list = db('user')
            ->where('id','>',0)
            ->order('id asc')
            ->select();
        foreach ($list as &$item){
            $item['key']=$item['id'];
        }

        $list = json_encode($list,JSON_UNESCAPED_UNICODE);
        $this->assign('list',$list);
      //  $this->success('获取成功', null, $list);
        return $this->view->fetch();
    }


}
